# Create your views here.
from risk.models import *
from risk.serializers import *
from dvadmin.utils.viewset import CustomModelViewSet


class EntityGongyexvkeViewSet(CustomModelViewSet):
    """
    list:查询
    create:新增
    update:修改
    retrieve:单例
    destroy:删除
    """
    queryset = EntityGongyexvke.objects.all()
    serializer_class = EntityGongyexvkeSerializer
    create_serializer_class = EntityGongyexvkeCreateUpdateSerializer
    update_serializer_class = EntityGongyexvkeCreateUpdateSerializer
    filter_fields = ["企业名称", "统一信用代码", "许可证编号","辖区"]
    search_fields = ["企业名称", "统一信用代码", "许可证编号","辖区"]
